package com.shoulei.designpattern.ProxyPattern;

/**
 * @ClassName:RealImage
 * @Descrition:
 * @Author:shoulei
 * @Date:2019/4/14 15:59
 * @Verson:
 */
public class RealImage implements Image{
    private String fileName;

    public RealImage(String fileName) {
        this.fileName = fileName;
        loadFromDisk(fileName);
    }

    private void loadFromDisk(String fileName) {
        System.out.println("loading  "+ fileName);
    }

    @Override
    public void display() {
        System.out.println("display........ "+ fileName);
    }
}
